@charset "utf-8";

// 接口文档tabs样式
@mixin tabs {
    height: size(40);
    display: flex;
    align-items: center;
    position: relative;
    font-size: 12px;
    flex: 0 0 auto;
    width: 200px;
    cursor: default;
    padding: 0 size(10);
    .item-text {
        margin-left: size(5);
        display: inline-block;
        max-width: size(100);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    background: rgb(222, 225, 230);
    &:hover {
        background: #e2e2e2;
    }
    .iconfont {
        font-size: 16px;
        display: flex;
        align-items: center;
    }
    &.active {
        background: #f0f3fa;
    }
}

// 参数录入快捷方式(应用模板)
@mixin apply-template {
    width: size(350);
    position: sticky;
    top: 0;
    background: $white;
    padding: size(10) size(15) 0;
    .manage-config {
        padding: size(0) size(10);
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: size(30);
        background: $theme-color;
    }
    .manage-ipt {
        display: flex;
        align-items: center;
        border-top: 1px dashed $gray-400;
        margin-top: size(10);
        input {
            flex: 1;
            height: size(30);
            line-height: size(30);
            border: none;
            text-indent: 1em;
            border-right: 1px solid $gray-400;
        }
    }
    .params-item {
        display: inline-block;
        padding: size(2) size(10);
        cursor: pointer;
        background: $gray-200;
        margin-left: size(10);
        &:hover {
            background: $gray-300;
        }

    }
}
//自定义banner node
@mixin custom-tree-node {
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
    min-height: size(30);
    &:hover {
        .more {
            display: block;
        }
    }
    .file-icon {
        font-size: fz(14);
        margin-right: size(5);
    }
    .folder-icon {
        color: $yellow;
        flex: 0 0 auto;
        width: size(16);
        height: size(16);
        margin-right: size(5);
    }
    .node-label-wrap {
        display: flex;
        flex-direction: column;
        flex: 1;
        overflow: hidden;
        .node-top {
            width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .node-bottom {
            color: $gray-500;
            width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
    }
    //重命名输入框
    .rename-ipt {
        flex: 0 0 75%;
        height: size(22);
        border: 1px solid $theme-color;
        font-size: 1em;
        margin-left: -1px;
        &.error {
            border: 2px solid $red;
        }
    }
    .more {
        display: none;
        flex: 0 0 auto;
        margin-left: auto;
        padding: size(5) size(10);
    }
    &.active-node {
        background-color: lighten($theme-color, 30%);
    }
    &.select-node {
        background-color: lighten($theme-color, 20%);
    }
    &.cut-node {
        color: $gray-500;
        .file-icon {
            color: $gray-500!important;
        }
        .folder-icon {
            color: $gray-300!important;
        }
    }
}
//contextmenu
@mixin contextmenu-item {
    line-height: 2em;
    padding: size(5) size(25);
    cursor: pointer;
    display: flex;
    &.disabled {
        color: $gray-500;
        cursor: default;
        &:hover {
            background: inherit;
            color: $gray-500;
        }
    }
    .hot-key {
        margin-left: auto;
        color: $gray-500;
    }
    &:hover {
        background: $gray-200;
        color: $theme-color;
    }
}
@mixin contextmenu {
    position: fixed;
    background: $white;
    border-radius: $border-radius-sm;
    box-shadow: rgb(0 0 0 / 10%) 0px 2px 8px 0px; //墨刀弹窗样式
    z-index: $zIndex-contextmenu;
    // min-width: size(240);
    animation: ctx-fade .2s;
    @keyframes ctx-fade {
        from {
            transform: scale(0.8);
            opacity: 0;
        }
        to {
            transform: scale(1);
            opacity: 1;
        }
    }
    .item-list {
        @include contextmenu-item;
    }
    .divider {
        margin: size(4) 0;
        border-top: 1px solid $gray-200;
    }
}

//拖拽bar样式
@mixin bar {
    position: absolute;
    height: 100%;
    width: size(6);
    background: transparent;
    left: size(300);
    z-index: $zIndex-drag-bar;
    box-sizing: content-box;
    margin-left: size(-3);
    cursor: ew-resize;
    &.active {
        background: $theme-color;
    }
}

//右上角关闭按钮
@mixin rt-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: size(5);
    top: size(5);
    font-size: fz(18);
    width: size(22);
    height: size(22);
    color: $red;
    cursor: pointer;
    border-radius: 50%;
    &:hover {
        background: $gray-300;
    }
}













